package com.belizer.threadCommunicate;

import com.belizer.threadCommunicate.Thread02;
import com.belizer.threadCommunicate.Thread03;

import java.io.IOException;
import java.nio.channels.Pipe;

/**
 * Created by zhaoyang on 2016/10/10.
 */
public class TestThreadCommunicate {
    public static void main(String[] args) throws IOException, InterruptedException {
        Pipe pipe=Pipe.open();
        Thread02 thread02=new Thread02(pipe);
        thread02.run();
        Thread03 thread03=new Thread03(pipe);
        thread03.run();
    }
}
